{% load future wenlincms_tags wlcore_tags report_tags %}
<h1 class="pdf-headtitle">四、关联幕后</h1>
<div class="pdf-divbox">
    <h2 class="pdf-secondtitle">3.1 企业对外投资</h2>
    {% if  el_entinvs %}
        <table class="pdf-table">
            <thead>
            <tr>
                <th style="width: 20px;"></th>
                <th>被投企业</th>
                <th style="width: 130px;">认缴出资额(万元)</th>
                <th style="width: 90px;">币种</th>
                <th style="width: 90px;">出资比例(%)</th>
                <th style="width: 90px;">出资日期</th>
            </tr>
            </thead>
            <tbody>
            {% for res in el_entinvs %}
                <tr>
                    <td class="pdf-counter">{{ forloop.counter }}</td>
                    <td>{{ res.entid.ENTNAME }}</td>
                    <td class="cf3">{{ res.SUBCONAM|elfloat:1|elweizhi }}</td>
                    <td>{{ res.CURRENCY|elweizhi }}</td>
                    <td>{{ res.CONPROP|elfloat:3|elweizhi }}</td>
                    <td>{{ res.CONDATE|date:"Y-m-j"|elweizhi }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p class="pdf-nodata">暂无</p>
    {% endif %}
</div>

<div class="pdf-divbox">
    <h2 class="pdf-secondtitle">3.2 法人对外投资</h2>
    {% if el_frinvs %}
        <table class="pdf-table">
            <thead>
            <tr>
                <th style="width: 20px;"></th>
                <th style="width: 90px;">姓名</th>
                <th>被投企业</th>
                <th style="width: 130px;">认缴出资额(万元)</th>
                <th style="width: 90px;">币种</th>
                <th style="width: 90px;">出资比例(%)</th>
                <th style="width: 90px;">出资日期</th>
            </tr>
            </thead>
            <tbody>
            {% for res in el_frinvs %}
                <tr>
                    <td class="pdf-counter">{{ forloop.counter }}</td>
                    <td>{{ res.INV }}</td>
                    <td>{{ res.entid.ENTNAME }}</td>
                    <td class="cf3">{{ res.SUBCONAM|elfloat:1|elweizhi }}</td>
                    <td>{{ res.CURRENCY|elweizhi }}</td>
                    <td>{{ res.CONPROP|elfloat:3|elweizhi }}</td>
                    <td>{{ res.CONDATE|date:"Y-m-j"|elweizhi }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p class="pdf-nodata">暂无</p>
    {% endif %}
</div>

{% if version == "10" %}
    <div class="pdf-divbox">
        <h2 class="pdf-secondtitle">3.3 股东高管对外投资</h2>
        {% if el_personinvs %}
            <table class="pdf-table">
                <thead>
                <tr>
                    <th style="width: 20px;"></th>
                    <th style="width: 90px;">姓名</th>
                    <th>被投企业</th>
                    <th style="width: 130px;">认缴出资额(万元)</th>
                    <th style="width: 90px;">币种</th>
                    <th style="width: 90px;">出资比例(%)</th>
                    <th style="width: 90px;">出资日期</th>
                </tr>
                </thead>
                <tbody>
                {% for res in el_personinvs %}
                    <tr>
                        <td class="pdf-counter">{{ forloop.counter }}</td>
                        <td>{{ res.INV }}</td>
                        <td>{{ res.entid.ENTNAME }}</td>
                        <td class="cf3">{{ res.SUBCONAM|elfloat:1|elweizhi }}</td>
                        <td>{{ res.CURRENCY|elweizhi }}</td>
                        <td>{{ res.CONPROP|elfloat:3|elweizhi }}</td>
                        <td>{{ res.CONDATE|date:"Y-m-j"|elweizhi }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        {% else %}
            <p class="pdf-nodata">暂无</p>
        {% endif %}
    </div>
{% endif %}

<div class="pdf-divbox">

    <h2 class="pdf-secondtitle">{% if version == "11" %}3.3{% else %}3.4{% endif %} 法人在外任职</h2>
    {% if  el_frpositions %}
        <table class="pdf-table">
            <thead>
            <tr>
                <td class="pdf-counter">{{ forloop.counter }}</td>
                <th style="width: 90px;">姓名</th>
                <th>任职企业</th>
                <th style="width: 130px;">职务</th>
                <th style="width: 90px;">是否法人</th>
                <th style="width: 90px;">任职自</th>
                <th style="width: 90px;">任职至</th>
            </tr>
            </thead>
            <tbody>
            {% for res in el_frpositions %}
                <tr>
                    <td class="pdf-counter">{{ forloop.counter }}</td>
                    <td>{{ res.NAME }}</td>
                    <td>{{ res.entid.ENTNAME }}</td>
                    <td class="cf3">{{ res.get_POSITION_display|elweizhi }}</td>
                    <td>{{ res.LEREPSIGN|elbool }}</td>
                    <td>{{ res.OFFHFROM|date:"Y-m-j"|elweizhi }}</td>
                    <td>{{ res.OFFHTO|date:"Y-m-j"|elweizhi }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p class="pdf-nodata">暂无</p>
    {% endif %}
</div>

{% if version == "10" %}
    <div class="pdf-divbox">
        <h2 class="pdf-secondtitle">3.5 股东高管在外任职</h2>
        {% if  el_personpositions %}
            <table class="pdf-table">
                <thead>
                <tr>
                    <th style="width: 20px;"></th>
                    <th style="width: 90px;">姓名</th>
                    <th>任职企业</th>
                    <th style="width: 130px;">职务</th>
                    <th style="width: 90px;">是否法人</th>
                    <th style="width: 90px;">任职自</th>
                    <th style="width: 90px;">任职至</th>
                </tr>
                </thead>
                <tbody>
                {% for res in el_personpositions %}
                    <tr>
                        <td class="pdf-counter">{{ forloop.counter }}</td>
                        <td>{{ res.NAME }}</td>
                        <td>{{ res.entid.ENTNAME }}</td>
                        <td class="cf3">{{ res.get_POSITION_display|elweizhi }}</td>
                        <td>{{ res.LEREPSIGN|elbool }}</td>
                        <td>{{ res.OFFHFROM|date:"Y-m-j"|elweizhi }}</td>
                        <td>{{ res.OFFHTO|date:"Y-m-j"|elweizhi }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        {% else %}
            <p class="pdf-nodata">暂无</p>
        {% endif %}
    </div>

    <div class="pdf-divbox">
        {#        <iframe src="{{ el_post.get_report_url }}tupu/?isiframe=1&dstyle=1" width="100%" height="620px"#}
        {#                frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>#}
    </div>
{% endif %}

<div class="pdf-divbox">

    <h2 class="pdf-secondtitle">{% if version == "11" %}3.4{% else %}3.6{% endif %} 企业分支机构</h2>
    {% if  el_filiations %}
        <table class="pdf-table">
            <thead>
            <tr>
                <th style="width: 20px;"></th>
                <th>分支机构名称</th>
                <th style="width: 160px;">分支机构企业注册号</th>
                <th style="width: 140px;">分支机构负责人</th>
                <th style="width: 160px;">分支机构地址</th>
            </tr>
            </thead>
            <tbody>
            {% for res in el_filiations %}
                <tr>
                    <td class="pdf-counter">{{ forloop.counter }}</td>
                    <td>{{ res.BRNAME }}</td>
                    <td>{{ res.BRREGNO|elweizhi }}</td>
                    <td>{{ res.BRPRINCIPAL|elweizhi }}</td>
                    <td>{{ res.BRADDR|elweizhi }}</td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    {% else %}
        <p class="pdf-nodata">暂无</p>
    {% endif %}
</div>
